package com.mdlib.helper.module.web;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import com.ljlib.core.base.BaseCommonActivity;
import com.ljlib.core.base.BaseFragment;


/**
 * Created by bin on 16/11/27.
 */

public class WebActivity extends BaseCommonActivity {

    public static Intent newIntent(Context context, String title, String url) {
        Intent intent = new Intent(context, WebActivity.class);
        intent.putExtra(WebFragment.EXTRA_TITLE, title);
        intent.putExtra(WebFragment.EXTRA_URL, url);
        return intent;
    }


    String mTitle;
    String mUrl;


    @Override
    protected boolean initBundle(Bundle bundle) {
        mTitle = bundle.getString(WebFragment.EXTRA_TITLE);
        mUrl = bundle.getString(WebFragment.EXTRA_URL);
        return true;
    }

    @Override
    protected BaseFragment getFirstFragment() {
        return WebFragment.newInstance(mTitle, mUrl);
    }
}
